<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>动感菜单</title>
    <link rel="stylesheet" href="style.css">
</head>

<body>
<div id="kur1" class="nav">
    <div id="t1" class="toggle">
        <span></span>
    </div>
    <ul>
        <li style="--i:0">Home</li>
        <li style="--i:1">About</li>
        <li style="--i:2">Services</li>
        <li style="--i:3">Work</li>
        <li style="--i:4">Contact</li>
    </ul>

</div>

</body>
<script>
    let nav = document.getElementById('kur1')
    let toggle = document.getElementById('t1')

    toggle.addEventListener('click', () => {
        toggle.classList.toggle('active')
        nav.classList.toggle('active')
    })

</script>

</html>